package com.example.javaee.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.javaee.domain.UserCourse;
import com.example.javaee.domain.UserDislike;
import com.example.javaee.domain.UserLike;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDislikeMapper extends BaseMapper<UserDislike>
{
    @Select("select * from user_dislike where userId=#{userId} and commentId=#{commentId}")
    UserDislike findByUserIdAndCommentId(Integer userId, Long commentId);

    @Delete("delete from user_dislike where userId=#{userId} and commentId=#{commentId}")
    void deleteByUserIdAndCommentId(Integer userId, Long commentId);
}
